import request from '@/utils/request'

//已到店
export function arrival(id){
  return request({
    url: '/workflow/appointmentInfo/arrival/'+id,
    method: 'put'
  })
}

//取消预约
export function cancel(id){
  return request({
    url: '/workflow/appointmentInfo/cancel/'+id,
    method: 'get'
  })
}

//生成结算单
export function generateStatement(id){
  return request({
    url: '/workflow/appointmentInfo/generateStatement/'+id,
    method: 'get'
  })
}


// 查询预约信息列表
export function listAppointmentInfo(query) {
  return request({
    url: '/workflow/appointmentInfo/list',
    method: 'get',
    params: query
  })
}

// 查询预约信息详细
export function getAppointmentInfo(id) {
  return request({
    url: '/workflow/appointmentInfo/' + id,
    method: 'get'
  })
}

// 新增预约信息
export function addAppointmentInfo(data) {
  return request({
    url: '/workflow/appointmentInfo',
    method: 'post',
    data: data
  })
}

// 修改预约信息
export function updateAppointmentInfo(data) {
  return request({
    url: '/workflow/appointmentInfo',
    method: 'put',
    data: data
  })
}

// 删除预约信息
export function delAppointmentInfo(id) {
  return request({
    url: '/workflow/appointmentInfo/' + id,
    method: 'delete'
  })
}
